home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Power 1997 December
/
MACPOWER-1997-12.ISO.7z
/
MACPOWER-1997-12.ISO
/
AMUG
/
PROGRAMMING
/
Raven 1.2 Examples.sit
/
Raven 1.2 Examples
/
BoxPaint
/
Source
/
Texture.h
< prev
next >
Wrap
Text File
|
1997-03-09
|
2KB
|
65 lines
/*
* File: Texture.h
* Summary: T3DPixmapTexture than can be drawn onto.
* Written by: Jesse Jones
*
* Copyright ゥ 1997 Jesse Jones.
* For conditions of distribution and use, see copyright notice in ZTypes.h
*
* Change History (most recent first):
*
* <-> 3/09/97 JDJ Created.
*/
#pragma once
#include <Z3DTextures.h>
#include <ZPicture.h>
// ===================================================================================
// class CTextureMap
// ===================================================================================
class CTextureMap : public T3DPixmapTexture {
typedef T3DPixmapTexture Inherited;
//-----------------------------------
// Initialization/Destruction
//
public:
virtual ~CTextureMap();
CTextureMap(const TPicture& pict, ulong resolution);
//-----------------------------------
// New API
//
public:
ulong GetResolution() const {return this->GetWidth();}
void SetResolution(ulong resolution);
void SetPict(const TPicture& pict);
void DrawLine(const TQ3Param2D& from, const TQ3Param2D& to);
// Paints a line on the texture using UV coordinates.
//-----------------------------------
// Internal API
//
protected:
void DrawLine(const TPoint& from, const TPoint& to);
// Paints a line on the texture using pixmap coordinates.
void SetPixel(SPixmapStorage& pixmap, const TPoint& pixel);
//-----------------------------------
// Member Data
//
protected:
TPicture mPict; // the original image
};